﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;

namespace DTO
{
    public class UserModule
    {
        String userID;
        int moduleID;

        public UserModule()
        {
        }

        /// <summary>
        /// User ID.
        /// </summary>
        public String UserID 
        {
            get { return this.userID; }
        }
           /// Create DTO.UserModulee instance using SqlDataReader object.
        /// </summary>
        /// <param name="reader">Object contains informations get from DB.</param>
        public UserModule(SqlDataReader reader)
        {
            if (reader != null && !reader.IsClosed)
            {
               userID = reader.GetString(0);
                moduleID = reader.GetInt32(1);
              }
        }
        /// <summary>
        /// Module ID.
        /// </summary>
        public int ModuleID
        {
            get { return this.moduleID; }
        }
    }
}